// import { createApp } from 'vue'
import { createSSRApp } from 'vue'

import ElementPlus, { ElMessage } from 'element-plus'
import 'element-plus/dist/index.css'

import App from './App.vue'
import router from './router'
import { store, key } from './store/index'
import i18n from './language/i18n'

export function createApp() {
  const app = createSSRApp(App)
  app.config.globalProperties.$message = ElMessage
  app.use(i18n)
  app.use(router).use(ElementPlus).use(store, key)
  return { app, router }
}
